package com.itheima;

import com.itheima.domain.User;
import com.itheima.service.UserService;

public class App {

    public static void main(String[] args) {

        //1. 读取beans.xml
        SpringApplicationContext beans = new SpringApplicationContext("beans.xml");
        //2. 通过配置文件创建对象
        UserService userService = (UserService) beans.getBean("userService");
        User user = userService.findUser();
        //3. 调用对象的方法，打印
        System.out.println(user);



    }
}
